package com.itheima.demo9_多态的应用场景.形参多态;

import java.lang.reflect.Method;

public class Test {
    public static void main(String[] args) {
        Dog d = new Dog();
//        Animal anl1 = d;
        method(d);

        System.out.println("======");

        Cat c = new Cat();
//        Animal anl2 =c;
        method(c);
    }

        public static void method(Animal anl) {
            anl.eat();
        }




}
